<!DOCTYPE HTML>

<html>

<head>
        <title></title>

        <script type="text/javascript">
        
        function myfunc ()
        {
            alert("why 2 times?");
            
            var xml_http = document.getElementById("mycanvas");
            var xml_http = xml_http.getContext("2d");
            //var xml_http = new XMLHttpRequest();
            //var xml_http = new Date();
            if (!xml_http)
            {
                alert("fail!");
            }
            var tmp = "";
            alert(typeof(xml_http));
            //alert(xml_http.valueOf());
            //alert(xml_http.toString());
            for ( var p in xml_http )
            {
                if ( "function" == typeof (xml_http[p]) )
                {
                    tmp += xml_http[p] + "\n";
                }
                else
                {
                    tmp += p + " = " + xml_http[p] + "\n";
                }
            }
            alert(tmp);
            document.getElementById("info").innerHTML = "<pre>" + tmp + "</pre>";
        }

        </script>

        <style type="text/css">
        </style>
</head>



<body>
    <canvas id="mycanvas" width="800" height="500"></canvas>
    <p id="info"></p>
        <script type="text/javascript">
        myfunc();
        
        </script>
</body>



</html>